set(CMAKE_TOOLCHAIN_FILE  ./myarm.cmake)

cmake_minimum_required(VERSION 3.15.0)
project(PhotoCollect)


add_subdirectory(APP)
add_subdirectory(HARDWARE)
add_subdirectory(THREAD)

include_directories(${PROJECT_SOURCE_DIR}/APP) # equals to gcc -I
include_directories(${PROJECT_SOURCE_DIR}/HARDWARE) # equals to gcc -I
include_directories(${PROJECT_SOURCE_DIR}/THREAD) # equals to gcc -I

link_directories(${PROJECT_SOURCE_DIR}/APP) #equals to gcc -L
link_directories(${PROJECT_SOURCE_DIR}/HARDWARE) #equals to gcc -L
link_directories(${PROJECT_SOURCE_DIR}/THREAD) #equals to gcc -L

link_libraries(app) #libapp.a, equals to gcc -l
link_libraries(hardware) #libapp.a, equals to gcc -l
link_libraries(mythread) #libapp.a, equals to gcc -l
link_libraries(pthread)

add_executable(testapp ./main.c)



